$(function () {
    $('.am-header-title').text('系统设置');

    function showalert(txt) {
        $("#modal-alert").find(".am-modal-bd").text(txt)
            .end()
            .modal("open");
    }

    $("#logout").click(function () {


        var url = "/h5/logout";
        $.post(url, function (result) {
            if (result.code = "000000") {
                //清除localstorage
                localStorage.removeItem("user");
                localStorage.removeItem("userModal");
                localStorage.removeItem("clothes");
                localStorage.removeItem("show");
                localStorage.removeItem("userTmp");
                window.location.href = "../../app/login/login.jsp"
            }

        })

    })


    $("#clear").click(function () {
        localStorage.removeItem("clothes");
        localStorage.removeItem("show");

        showalert("清除成功")

    })

});

